package br.com.cardoso.videostore.model.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.cardoso.persistence.EntityBean;

@Entity
@Table(name = "phone")
public class PhoneEntity extends EntityBean {

	private static final long serialVersionUID = 1L;
	
	private String number;
	private TypePhoneEntity typePhone;

	@Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
	public Long getId() {
		return super.id;
	}

	public String getNumber() {
		return number;
	}

	public void setNumber(String number) {
		this.number = number;
	}

	@ManyToOne
	@JoinColumn(name = "type_phone_id", referencedColumnName = "id")
	public TypePhoneEntity getTypePhone() {
		return typePhone;
	}

	public void setTypePhone(TypePhoneEntity typePhone) {
		this.typePhone = typePhone;
	}

}
